<html>
    <head>
        <title>首页</title>
		<meta name="layout" content="main" />
        <style>
        .graphValuesimpleGraph{
            font-size:6pt;
        }
        </style>
    </head>
    <body>
    <g:form action="stat" method="post">
        <select name="time" >
            <%
            statGroup.each{
            %>
                <option value ="${it.key}">${it.key.substring(0,4)}年${it.key.substring(4)}月</option>
            <%
            }
            %>
        </select>
        <input type="submit" style="width:60px;" value="提  交" />
    </g:form>
            <div id="simpleGraph" style="width:700px"></div>
 
<g:javascript src="domain/jqBarGraph.js" type="text/javascript"/>
<script> 
graphByMonth = new Array(
        <%
        statsList.eachWithIndex{elem,i ->
            if(i+1 < statsList.size()){
        %>
            [${elem.hit},'${elem.day}'],
        <%
            }else{
        %>
            [${elem.hit},'${elem.day}']
        <%
            }
        }
        %> 
);


$("#simpleGraph").jqBarGraph({
	data: graphByMonth,
	width: 600,
	colors: ['#7D252B','#666666'],
	color: '#1A2944',
	barSpace: 10,
    title: false,
    legendWidth: 100,
    showValues: true,
    position: 'bottom',
    showValuesColor: '#fff',
	title: '<h3>${monthName}统计</h3>'
});
 

</script>

    </body>
</html>